<template>
  <div>
    <ModalUI title="新增" @submit="add" @change:event="handleChange">
      <!-- <template #form>
        <el-form :model="form" label-width="auto" style="max-width: 600px">
          <el-form-item label="Activity name">
            <el-input v-model="form.name" />
          </el-form-item>
          <el-form-item label="Resources">
            <el-radio-group v-model="form.resource">
              <el-radio value="Sponsor">Sponsor</el-radio>
              <el-radio value="Venue">Venue</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="Activity form">
            <el-input v-model="form.desc" type="textarea" />
          </el-form-item>
        </el-form>
      </template> -->
    </ModalUI>
  </div>
</template>

<script setup lang="ts">
import ModalUI from "./ModalUI.vue";
import { ElMessage } from "element-plus";
const form = ref({
  name: "",
  region: "",
  date1: "",
  date2: "",
  delivery: false,
  type: [],
  resource: "",
  desc: "",
  desc2: "",
});
const add = (v) => {
  // 参数处理，数据处理
  // 调用新增接口
  ElMessage({
    message: "新增成功",
    type: "success",
  });
};
const handleChange = (v) => {
  if (v) {
    ElMessage({
      message: "调用新增时的业务接口",
      type: "info",
    });
  }
};
</script>
